package com.db.patterns.factory.demo03;

public class DivOperation extends Operation {

    @Override
    double getResult() {
        if (Double.compare(numB, 0) == 0) {
            throw new ArithmeticException("被除数不能为空");
        }
        return numA / numB;
    }
}